package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.GoodsType;
import cn.wolfcode.trip.base.mapper.GoodsTypeMapper;
import cn.wolfcode.trip.base.service.IGoodsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsTypeServiceImpl implements IGoodsTypeService {

    private final GoodsTypeMapper goodsTypeMapper;

    @Autowired
    public GoodsTypeServiceImpl(GoodsTypeMapper goodsTypeMapper) {
        this.goodsTypeMapper = goodsTypeMapper;
    }

    /**
     * 查询所有商品类型
     *
     * @return 商品类型列表
     */
    @Override
    public List<GoodsType> listAll() {
        return goodsTypeMapper.selectAll();
    }
}
